<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div > a {
            color: red;
        }
    </style>
</head>
<body>
<div>
    <a href="#">这是div里面的a</a>
    <p><a href="#">这是div-p-a</a></p>

</div>
</body>
</html>